package application.core;

import javax.swing.JFileChooser;

import application.game.Level;

public class Project{
	private Application application;
	private String directory;
	private String filename;
	
	Level level;
	
	public Project(Application application){
		this.application = application;
	}
	
	public void saveAs(){
		String path = directory + "/" + filename;
		// String path = "";
		JFileChooser chooser = new JFileChooser();
		chooser.setCurrentDirectory(new java.io.File("."));
		chooser.setDialogTitle("Select directory");
		chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		chooser.setAcceptAllFileFilterUsed(false);
		if(chooser.showOpenDialog(application) == JFileChooser.APPROVE_OPTION){
			path = chooser.getSelectedFile().getPath();
		}
		// chooser.setVisible(false);
		
		// int inputRows = Convertor.getInt(frameHeightTextField.getText());
		// int inputColumns = Convertor.getInt(frameWidthTextField.getText());
		// application.getLevel(nameLevelTextField.getText(), inputRows, inputColumns);
		// application.getLevel().save(path);
		System.out.println("path " + path);
	}
}
